{% load static %}

<html lang="zh">
    <head>
        <meta http-equiv="content-type" content="text/html" charset="UTF-8">
        <link rel="stylesheet" href="{% static 'css/style.css' %}">
        <title>我的博客</title>
    </head>
    <body>
        <div class="header">
            <h1 align="center">我的博客</h1>
        </div>
        {% for blog in blogs %}
        <div align="center" class="blog">
            <div class="title">
                <a href="{% url 'blog:blog_get_detail' blog.pk %}"><h2>{{ blog.title }}</h2></a>
            </div>
            <div class="info">
                <span class="category" style="color: #ff9900;">{{ blog.category.name }}</span>
                <span class="author" style="color: #4a86e8;">{{ blog.author }}</span>
                <span class="pub" style="color: #6aa84e">{{ blog.pub }}</span>
            </div>
            <div class="summary">
                {{ blog.content | truncatechars:100 }}
            </div>
        </div>
        {% endfor %}
    </body>
</html>

